package com.grao.waterschool.human.entiry.dto;

import com.grao.waterschool.human.entiry.po.TSysTuser;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springdoc.api.annotations.ParameterObject;

@Data
@ParameterObject
public class UserLogin {
    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String pwd;

    public TSysTuser toUser() {
        TSysTuser tuser = new TSysTuser();
        tuser.setTusername(getUsername());

        tuser.setTpassword(getPwd());
        return tuser;
    }
}
